package com.leoman.spinningmachine.tab3;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.leoman.helper.adapter.BaseRecyclerAdapter;
import com.leoman.spinningmachine.R;
import com.leoman.spinningmachine.bean.InvitationBean;

import java.util.List;

/**
 * Created by 12453 on 2019/4/20.
 * 访客邀请Adapter
 */

public class InvitationAdapter extends BaseRecyclerAdapter<InvitationBean> {

    public InvitationAdapter(int layoutResId, List<InvitationBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void bindTheData(BaseViewHolder holder, InvitationBean data, int position) {
        TextView tv_door = holder.findViewById(R.id.tv_door);
        ImageView iv_select = holder.findViewById(R.id.iv_select);

        tv_door.setText(data.name);
        iv_select.setVisibility(data.isSelect() ? View.VISIBLE : View.GONE);
    }
}
